package com.llse.lang;

import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.util.NlsContexts;
import com.intellij.openapi.util.NlsSafe;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

public class LLseJsFileType extends LanguageFileType {

    public static final LLseJsFileType INSTANCE = new LLseJsFileType();

    private static final String FILE_NAME = "llse.js";

    private static final String FILE_DRES = "llse.js language file";

    protected LLseJsFileType() {//初始化抽象类
        super(LLseJsLanguage.INSTANCE);
    }

    @Override
    public @NonNls @NotNull String getName() {
        return FILE_NAME;
    }

    @Override
    public @NlsContexts.Label @NotNull String getDescription() {//描述
        return FILE_DRES;
    }

    @Override
    public @NlsSafe @NotNull String getDefaultExtension() {//文件拓展名
        return FILE_NAME;
    }

    @Override
    public @Nullable Icon getIcon() {//文件图标
        return LLseIcons.FILE;
    }
}
